package cn.elwy.rcp.ui.editor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

public class BaseEditorInput implements IEditorInput {

  protected String name;
  protected TreeViewer treeViewer;

  public BaseEditorInput(String name) {
    this.name = name;
  }

  public boolean exists() {
    return false;
  }

  public ImageDescriptor getImageDescriptor() {
    return null;
  }

  public String getName() {
    return name;
  }

  public IPersistableElement getPersistable() {
    return null;
  }

  public String getToolTipText() {
    return getName();
  }

  @SuppressWarnings("rawtypes")
  public Object getAdapter(Class arg0) {
    return null;
  }

  public TreeViewer getTreeViewer() {
    return treeViewer;
  }

  public void setTreeViewer(TreeViewer treeViewer) {
    this.treeViewer = treeViewer;
  }

}
